From c528148dd32190ab302e602384a63d4519eaba86 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Fri, 10 Sep 2010 19:01:31 +0100 Subject: [PATCH] oxenstored: when reading / read automatically the root node. Signed-off-by: Vincent Hanquez --- tools/ocaml/xenstored/store.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/ocaml/xenstored/store.ml b/tools/ocaml/xenstored/store.ml index 34552bb9d3..4c9b1663e6 100644 --- a/tools/ocaml/xenstored/store.ml +++ b/tools/ocaml/xenstored/store.ml @@ -300,7 +300,12 @@ let read store perm path = Node.check_perm ent perm Perms.READ; ent.Node.value in - Path.apply store.root path do_read + if path = [] then ( + let ent = store.root in + Node.check_perm ent perm Perms.READ; + ent.Node.value + ) else + Path.apply store.root path do_read let ls store perm path = let children = -- 2.30.2